<?php
use Ratchet\Server\IoServer;
use Ratchet\Http\HttpServer;
use Ratchet\WebSocket\WsServer;
require_once '../../vendor/autoload.php';
require_once "Chat.php";
/*
$server = IoServer::factory(
		new Chat(),
		8080
);
echo "IoServer is started at 8080";
*/
$server = IoServer::factory(
		new HttpServer(
				new WsServer(
						new Chat()
				)
		),
		8080
);
echo "HttpServer is started at 8080";
$server->run();
